package com.zhuiYun.project.api.homepagefunction.groupfreeshipping.controller;
import com.zhuiYun.project.api.commoditydetail.entity.Commodity;
import com.zhuiYun.project.api.homepagefunction.groupfreeshipping.service.GroupFreeShippingService;
import com.zhuiYun.project.common.controller.BaseController;
import com.zhuiYun.project.common.response.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * @ClassName GroupFreeShippingController
 * @Description 拼团包邮管理
 * @Author lzk
 * @Date 2023/4/4 16:28
 **/
@RestController
@RequestMapping("/groupFreeShipping")
@Api(tags = "拼团包邮管理")
@Slf4j
@CrossOrigin
public class GroupFreeShippingController extends BaseController {
    @Autowired
    GroupFreeShippingService groupFreeShippingService;
    /**
     *
     * @Author lzk
     * @Description 拼团包邮查询商品信息
     * @date 2023/4/4 16:52
     * Return com.zhuiYun.project.common.response.CommonResult
     */
    @GetMapping("/queryTheInformationOfGroupedProducts")
    @ApiOperation(value = "拼团包邮查询商品信息")
    public CommonResult queryTheInformationOfGroupedProducts(){
        List<Commodity> list = groupFreeShippingService.queryTheInformationOfGroupedProducts();
        log.info("拼团包邮查询商品信息"+list);
        return CommonResult.ok(list);
    }
}
